﻿<%@ Import Namespace="AFI.Speargun.Web.Core" %>

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<AFI.Speargun.Web.Models.AssetInventory>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    盘点信息 - 列表 -
    <%= Html.Encode(ViewData["AssetEntry.Appellation"])%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        列表 -
        <%= Html.Encode(ViewData["AssetEntry.Appellation"])%></h2>
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="data-table">
        <tr>
            <th>
                <%= Html.ActionLink("[新建]", "Create", new { id = ViewData["AssetEntryId"] })%>
            </th>
            <th>
                盘点人
            </th>
            <th>
                盘点日期
            </th>
            <th>
                资产状态
            </th>
            <th>
                盘点结果
            </th>
        </tr>
        <% foreach (var item in Model)
           { %>
        <tr>
            <td>
                <%= Html.ActionLink("[编辑]", "Edit", new { id=item.AssetInventoryId }) %>
                |
                <%= Html.ActionLink("[查看]", "Details", new { id=item.AssetInventoryId })%>
            </td>
            <td>
                <%= Html.Encode(Membership.GetUser(item.CheckingUser, false)) %>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:d}", item.CheckingDate)) %>
            </td>
            <td>
                <%= Html.Encode(((AssetStatus)item.AssetStatus).GetTextValue()) %>
            </td>
            <td>
                <%= Html.Encode(((CheckingResult)item.Result).GetTextValue())%>
            </td>
        </tr>
        <% } %>
    </table>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="LeftContent" runat="server">
    <% Html.RenderPartial("AssetEntryMenu", ViewData["AssetEntryId"].ToString()); %>
</asp:Content>
